/* 电话随访记录页面样式 */

/* 页面布局基础样式 */
.phone-followup-container {
  padding: 1rem;
}

/* 固定搜索容器样式 */
#fixed-search-container {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
}

/* 学生信息条样式 */
.student-info-bar-row {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid #007bff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: none;
  font-size: 0.9rem;
  color: #495057;
}

.student-info-bar-row.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.student-info-bar-row span {
  display: inline-block;
  margin-right: 1rem;
  white-space: nowrap;
}

.student-info-bar-row span span {
  font-weight: 600;
  color: #007bff;
}

/* 随访表单样式 */
#followup-form {
  margin-top: 1rem;
}

#followup-form .card {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#followup-form .card-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  padding: 0.75rem 1rem;
}

#followup-form .card-body {
  padding: 1.5rem;
}

/* 表单分组样式 */
.form-group-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.form-group-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #007bff;
}

/* 新增：优化的表单分组样式 */
.followup-form-container {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 25px;
  margin-bottom: 20px;
}

.form-section {
  margin-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 20px;
}

.form-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.form-section-title {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #0d6efd;
  padding: 8px 15px;
  margin: 0 0 15px 0;
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
}

.form-section-title .icon {
  margin-right: 8px;
  font-size: 16px;
}

/* 基础信息区样式 */
.section-basic-info .form-section-title {
  border-left-color: #17a2b8;
}

.section-basic-info .form-section-title .icon {
  color: #17a2b8;
}

/* 人员信息区样式 */
.section-personnel .form-section-title {
  border-left-color: #28a745;
}

.section-personnel .form-section-title .icon {
  color: #28a745;
}

/* 效果评估区样式 */
.section-evaluation .form-section-title {
  border-left-color: #ffc107;
}

.section-evaluation .form-section-title .icon {
  color: #ffc107;
}

/* 描述内容区样式 */
.section-description .form-section-title {
  border-left-color: #6f42c1;
}

.section-description .form-section-title .icon {
  color: #6f42c1;
}

/* 紧凑布局样式 */
.form-group-compact {
  margin-bottom: 15px;
}

.form-group-compact .form-control,
.form-group-compact .form-select {
  margin-bottom: 0;
}

.form-group-compact .form-label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #495057;
  font-size: 0.9rem;
}

/* 三列布局 */
.col-compact-3 {
  flex: 0 0 auto;
  width: 33.333333%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

/* 文本域样式优化 */
.textarea-group {
  margin-bottom: 20px;
}

.textarea-group .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.textarea-group .form-control {
  min-height: 80px;
  resize: vertical;
}

/* 表单控件优化 */
.form-control,
.form-select {
  border: 1px solid #ced4da;
  border-radius: 6px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* 必填字段标识 */
.form-label.required::after {
  content: " *";
  color: #dc3545;
}

/* 按钮组样式 */
.btn-group-custom {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 历史记录表格区域 */
#history-table-area {
  margin-top: 1rem;
}

#history-table-area .card {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#history-table-area .card-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  padding: 0.75rem 1rem;
}

/* 表格样式优化 */
.table {
  margin-bottom: 0;
}

.table th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #495057;
  padding: 0.75rem;
  vertical-align: middle;
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* 操作按钮样式 */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
  margin-right: 0.25rem;
}

.btn-link {
  color: #007bff;
  text-decoration: none;
}

.btn-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* 分页控件样式 */
#pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.page-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #007bff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.page-btn:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.page-btn.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.page-btn:disabled {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
  cursor: not-allowed;
}

/* 时间相关字段样式 */
input[type="date"],
input[type="time"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  color: #007bff;
  cursor: pointer;
}

/* 联系人信息样式 */
.contact-info-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #17a2b8;
}

/* 沟通记录样式 */
.communication-section {
  background: #fff3cd;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
}

/* 干预相关样式 */
.intervention-section {
  background: #d1ecf1;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #bee5eb;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .student-info-bar-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .student-info-bar-row span {
    display: block;
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
  
  .btn-group-custom {
    justify-content: center;
  }
  
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
  }
  
  #followup-form .card-body {
    padding: 1rem;
  }
  
  .followup-form-container {
    padding: 15px;
    margin: 10px 5px;
  }
  
  .form-section {
    margin-bottom: 20px;
  }
  
  .form-section-title {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  /* 移动端强制单列布局 */
  .col-compact-3,
  .form-group-compact {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .row {
    margin: 0 -0.5rem;
  }
  
  .form-control,
  .form-select {
    font-size: 16px; /* 防止iOS缩放 */
  }
  
  .textarea-group {
    margin-bottom: 1rem;
  }
  
  .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    margin: 0.2rem;
  }
  
  .btn-group-custom {
    justify-content: center;
    gap: 0.3rem;
  }
}

/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1024px) {
  .col-compact-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .followup-form-container {
    padding: 20px;
  }
}

/* 确保表单元素在所有设备上的基本样式 */
.form-control,
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 必填字段标识 */
.text-danger {
  color: #dc3545 !important;
  font-weight: 500;
}

/* 表单验证状态 */
.is-invalid {
  border-color: #dc3545;
}

.is-valid {
  border-color: #28a745;
}

/* 加载状态 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 表单动画效果 */
.form-section {
  animation: fadeInUp 0.3s ease-in-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 打印样式 */
@media print {
  .followup-form-container {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .btn {
    display: none;
  }
  
  .form-section-title {
    background: #f8f9fa !important;
    color: #000 !important;
  }
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #dee2e6;
}

/* 成功/错误提示样式 */
.alert-custom {
  border-radius: 6px;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f1b2b7 100%);
  color: #721c24;
}

.alert-info {
  background: linear-gradient(135deg, #cce7ff 0%, #b3d9ff 100%);
  color: #0c5460;
}
